<script setup lang="ts">
import { mockTable } from '@/mock'

const { columns, data, loadRows } = mockTable(
  ['code', '$08/01', '$08/02', '$08/03', '$08/04', '$08/05', '$08/06'],
  ['工时代码', '08/01', '08/02', '08/03', '08/04', '08/05', '08/06'],
)

loadRows([
  ['项目1', '张三，李四', '张三，王五'],
  ['项目2', '张三', '张三，王五'],
  ['项目3', '王五，李四', '张三，王五'],
])
</script>

<template>
  <ElForm :inline="true">
    <ElFormItem label="项目">
      <ElSelect>
        <ElOption value="code1">
          项目1
        </ElOption>
        <ElOption value="code2">
          项目2
        </ElOption>
        <ElOption value="code3">
          项目3
        </ElOption>
      </ElSelect>
    </ElFormItem>
    <ElFormItem label="日期范围">
      <ElDatePicker type="daterange" />
    </ElFormItem>
  </ElForm>

  <ElTable
    :border="true"
    :stripe="true"
    :data="data"
  >
    <ElTableColumn
      v-for="item in columns"
      :key="item.property"
      v-bind="item"
    />
  </ElTable>
</template>

<route lang="json5">
{
  "meta": {
    "index": 0,
    "title": "资源报告",
  },
}
</route>
